// Botuch
// koa实例化
const koa = require('koa');
const app = new koa();
// 中间件 洋葱结构
// 最外层 响应开始-->响应结束 计算响应时间
const koaDurationMiddleWare = require('./middleware/koa_response_duration');
app.use(koaDurationMiddleWare);
// 设置请求头
const koaHeaderMiddleWare = require('./middleware/koa.response_header');
app.use(koaHeaderMiddleWare);
// 最内层 读取文件
const koaDataMiddleWare = require('./middleware/koa_response_data');
app.use(koaDataMiddleWare);
// 监听端口3000
app.listen(3000);

const webSocketService = require('./service/web_socket_service');
webSocketService.listen();
